package com.example.databasepj.mapper;

import com.example.databasepj.entity.MerchantReviewEntity;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface MerchantReviewMapper {
    List<MerchantReviewEntity> selectMerchantReviewByMerchantID(int id);
    MerchantReviewEntity selectMerchantReviewByOrderID(int id);
    List<Integer> selectDistinctUser();
    void updateMerchantReview(MerchantReviewEntity merchantReviewEntity);

    int insertMerchantReview(MerchantReviewEntity merchantReviewEntity);

    int countByUser_id(int userID);
    float averageRatingByUserID(int userID);

}
